import request from '@/utils/request'

// 查询行政处罚列表
export function listPenalty(query) {
  return request({
    url: '/visit/penalty/list',
    method: 'get',
    params: query
  })
}

// 查询行政处罚详细
export function getPenalty(apId) {
  return request({
    url: '/visit/penalty/' + apId,
    method: 'get'
  })
}

// 新增行政处罚
export function addPenalty(data) {
  return request({
    url: '/visit/penalty',
    method: 'post',
    data: data
  })
}

// 修改行政处罚
export function updatePenalty(data) {
  return request({
    url: '/visit/penalty',
    method: 'put',
    data: data
  })
}

// 删除行政处罚
export function delPenalty(apId) {
  return request({
    url: '/visit/penalty/' + apId,
    method: 'delete'
  })
}

// 导出行政处罚
export function exportPenalty(query) {
  return request({
    url: '/visit/penalty/export',
    method: 'get',
    params: query
  })
}